project(upme-core)
SET (WT_CONNECTOR "wtfcgi" CACHE STRING "Connector used (wthttp or wtfcgi)")

set (SOURCES
	source/main.cpp
        source/mcore.cpp
        source/mlog.cpp
        source/ConfigFile.cpp
	)

set (HEADERS
        source/mcore.h
        source/mlog.h
        source/ConfigFile.h
)

SET(WT_PROJECT_TARGET upme.wt)

ADD_EXECUTABLE(${WT_PROJECT_TARGET} ${SOURCES} ${HEADERS})

TARGET_LINK_LIBRARIES(${WT_PROJECT_TARGET} ${WT_CONNECTOR} wt)

INCLUDE_DIRECTORIES(/usr/local/include/Wt)


# install for linux
if(${CMAKE_SYSTEM_NAME} STREQUAL Linux)
set(dir_bin ${CMAKE_INSTALL_PREFIX})
install(TARGETS upme.wt DESTINATION ${dir_bin})
endif()
